<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAccountsTable extends Migration
{
    /**
     * Run the migrations.
     * 结算
     * @return void
     */
    public function up()
    {
        Schema::create('accounts', function (Blueprint $table) {
            $table->increments('id');
	        $table->string('name',20)->comment('结算名称');
	        $table->integer('account_day')->comment('结算日期');
	        $table->tinyInteger('type')->comment('结算类型:1正常结算,2奖金结算');
	        $table->integer('statu')->comment('配置状态：0失效，1有效')->default(1);
	        $table->tinyInteger('status')->comment('配置状态：0未创建，1创建')->default(0);
	        $table->integer('company_id')->comment('所属公司id')->nullable();
	        $table->integer('uid')->comment('创建人uid')->nullable();
	        $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('accounts');
    }
}
